home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac 1 / Ian and Stuart's One (Australia).iso / Australasian Legends / Commercial / Rainbow Hill / MacDOS™ 2.0.0 / batches / mmore.bat < prev    next >
DOS Batch File  |  1993-07-30  |  883b  |  32 lines

  1. @echo off
  2. ! this is a simple program that lets you execute the MORE command with a wildcarded
  3. ! filename.
  4. ! Just type        MMORE name        to list the text file[s] identified by 'name'
  5. !
  6. ! If you want to skip the rest of a file after the first page and continue with
  7. ! the next file, type cmd-period or cntl-C and then reply 'N' when asked whether
  8. ! you want to terminate the batch job.
  9. !
  10.  
  11.     ! check that there is a parameter
  12.     if not "%1 " == " " goto CHECKED_LBL
  13.         echo MMORE requires a parameter
  14.         echo.
  15.         goto DONE_LBL
  16. :CHECKED_LBL
  17.  
  18.     ! the next line is needed to skip files which are not of type 'TEXT'
  19.     ! without executing the PAUSE
  20.     onerror CONTINUE_LBL
  21.     for %filename in (%1) do begin
  22.         more < %filename%
  23.         echo -------------------------- "%filename%" completed ----------------------
  24.         pause
  25.     :CONTINUE_LBL
  26.         next filename
  27.  
  28.     ! let's clean up the environment
  29.     set filename=
  30.     
  31. :DONE_LBL
  32.